import java.util.ArrayList;
import java.util.PriorityQueue;

/**
 * @author: gao
 * @create-date: 2025/3/6 19:49
 */

public class Solution {
    public static void main(String[] args) {
        PriorityQueue<Integer> queue1 = new PriorityQueue<>();
        queue1.offer(27);
        queue1.offer(15);
        queue1.offer(19);
        queue1.offer(28);
        queue1.offer(34);
        queue1.offer(49);
        System.out.println(queue1);
        System.out.println(queue1.isEmpty());
        System.out.println(queue1.size());

        System.out.println(queue1.peek());
        System.out.println(queue1.poll());
        queue1.clear();
    }

    public static void main1(String[] args) {
        PriorityQueue<Integer> queue1 = new PriorityQueue<>();
        PriorityQueue<Integer> queue2 = new PriorityQueue<>();

        ArrayList<Integer> list = new ArrayList<>();

        list.add(4);
        list.add(3);
        list.add(2);
        list.add(1);

        PriorityQueue<Integer> queue3 = new PriorityQueue<>(list);
        System.out.println(queue3);
    }
}